package com.qfedu.edu.controller;

import com.qfedu.edu.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author xiaobobo
 * @title: UserController
 * @projectName CD-Java-FY-2401-Springboot-Parent
 * @description: TODO
 * @date 2024/9/9  9:37
 */
@RestController
public class UserController {

    @Autowired
    private IUserService userService;
//
//    @Value("${k1}")
//    private String k1;
//
//    @Value("${k2}")
//    private String k2;
//
//    @Value("${k3}")
//    private String k3;
//
//    @Value("${user1.username}")
//    private String username;
//
//
//    @Value("${user3.habbits1[1]}")
//    private String habbit;

    @GetMapping("test1")
    public Object test1() {
        userService.print();
        return "第二个Springboot程序";
    }

    @GetMapping("test2")
    public Object test2() {
//        System.out.println("k1:"+k1);
//        System.out.println("k2:"+k2);
//        System.out.println("k3:"+k3);
//        System.out.println("username:"+username);
//        System.out.println("爱好是:"+habbit);
        return "测试yml格式的问题";
    }

}
